import 'core-js/modules/es.object.to-string';
import 'core-js/modules/es.promise';
import 'core-js/modules/web.timers';

import data from '../other/data.json';
import '../css/index.css';
import '../css/less.less';
import '../font/iconfont.css';
/**
 * 解决所有的js兼容问题，问题是生成的js文件体积太大，最终方案使用core-js
 *  '@babel/polyfill';
 */

console.log(data);

function add(x, y) {
  return x + y;
}

console.log(add(1, 2));

const mul = function mul(a, b) {
  return a * b;
};

console.log(mul(2, 3));
const promise = new Promise(((resolve) => {
  setTimeout(() => {
    console.log('定时器执行完成');
    resolve();
  }, 1000);
}));
console.log(promise);
